/*
 *  Licensed to the Apache Software Foundation (ASF) under one or more
 *  contributor license agreements.  See the NOTICE file distributed with
 *  this work for additional information regarding copyright ownership.
 *  The ASF licenses this file to You under the Apache License, Version 2.0
 *  (the "License"); you may not use this file except in compliance with
 *  the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
/* DO NOT EDIT THIS FILE - it is based on WGL headers and has been generated by nativebridge tool.*/

#include "org_apache_harmony_awt_nativebridge_windows_WGL.h"
static libHandler libOpenGL32;

JNIEXPORT void JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_init (JNIEnv * env, jclass cls) {
    LOAD_LIB(libOpenGL32, "OpenGL32");
    INIT_GL_GET_PROC_ADDRESS
}

void * (__stdcall * p_nbridge_wglGetProcAddress) (void *) = NULL;

JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglGetProcAddress( JNIEnv *env, jobject self, jlong param_0) {
    if (p_nbridge_wglGetProcAddress == NULL) {
        p_nbridge_wglGetProcAddress = (void * (__stdcall *) (void *)) FindFunction(libOpenGL32, "wglGetProcAddress");
    }
    return (jlong) (* p_nbridge_wglGetProcAddress)((void *) param_0);
}

void * (__stdcall * p_nbridge_wglCreateContext) (void *) = NULL;

JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglCreateContext( JNIEnv *env, jobject self, jlong param_0) {
    if (p_nbridge_wglCreateContext == NULL) {
        p_nbridge_wglCreateContext = (void * (__stdcall *) (void *)) FindFunction(libOpenGL32, "wglCreateContext");
    }
    return (jlong) (* p_nbridge_wglCreateContext)((void *) param_0);
}

int  (__stdcall * p_nbridge_wglMakeCurrent) (void *, void *) = NULL;

JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglMakeCurrent( JNIEnv *env, jobject self, jlong param_0, jlong param_1) {
    if (p_nbridge_wglMakeCurrent == NULL) {
        p_nbridge_wglMakeCurrent = (int  (__stdcall *) (void *, void *)) FindFunction(libOpenGL32, "wglMakeCurrent");
    }
    return (jint) (* p_nbridge_wglMakeCurrent)((void *) param_0, (void *) param_1);
}

static int  (__stdcall * p_nbridge_wglDestroyPbufferARB) (void *) = NULL;

JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglDestroyPbufferARB( JNIEnv *env, jobject self, jlong param_0) {
    if (p_nbridge_wglDestroyPbufferARB == NULL) {
        p_nbridge_wglDestroyPbufferARB = (int  (__stdcall *) (void *)) FindFunction(libOpenGL32, "wglDestroyPbufferARB");
    }
    return (jint) (* p_nbridge_wglDestroyPbufferARB)((void *) param_0);
}

int  (__stdcall * p_nbridge_SwapBuffers) (void *) = NULL;

JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_SwapBuffers( JNIEnv *env, jobject self, jlong param_0) {
    if (p_nbridge_SwapBuffers == NULL) {
        p_nbridge_SwapBuffers = (int  (__stdcall *) (void *)) FindFunction(libOpenGL32, "SwapBuffers");
    }
    return (jint) (* p_nbridge_SwapBuffers)((void *) param_0);
}

static int (__stdcall * p_nbridge_wglReleasePbufferDCARB) (void *, void *) = NULL;

JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglReleasePbufferDCARB( JNIEnv *env, jobject self, jlong param_0, jlong param_1) {
    if (p_nbridge_wglReleasePbufferDCARB == NULL) {
        p_nbridge_wglReleasePbufferDCARB = (int (__stdcall *) (void *, void *)) FindFunction(libOpenGL32, "wglReleasePbufferDCARB");
    }
    return (jint) (* p_nbridge_wglReleasePbufferDCARB)((void *) param_0, (void *) param_1);
}

static void * (__stdcall * p_nbridge_wglCreatePbufferARB) (void *, int, int, int, void *) = NULL;

JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglCreatePbufferARB( JNIEnv *env, jobject self, jlong param_0, jint param_1, jint param_2, jint param_3, jlong param_4) {
    if (p_nbridge_wglCreatePbufferARB == NULL) {
        p_nbridge_wglCreatePbufferARB = (void * (__stdcall *) (void *, int, int, int, void *)) FindFunction(libOpenGL32, "wglCreatePbufferARB");
    }
    return (jlong) (* p_nbridge_wglCreatePbufferARB)((void *) param_0, (int) param_1, (int) param_2, (int) param_3, (void *) param_4);
}

static int  (__stdcall * p_nbridge_wglQueryPbufferARB) (void *, int, void *) = NULL;

JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglQueryPbufferARB( JNIEnv *env, jobject self, jlong param_0, jint param_1, jlong param_2) {
    if (p_nbridge_wglQueryPbufferARB == NULL) {
        p_nbridge_wglQueryPbufferARB = (int  (__stdcall *) (void *, int, void *)) FindFunction(libOpenGL32, "wglQueryPbufferARB");
    }
    return (jint) (* p_nbridge_wglQueryPbufferARB)((void *) param_0, (int) param_1, (void *) param_2);
}

int  (__stdcall * p_nbridge_wglDeleteContext) (void *) = NULL;

JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglDeleteContext( JNIEnv *env, jobject self, jlong param_0) {
    if (p_nbridge_wglDeleteContext == NULL) {
        p_nbridge_wglDeleteContext = (int  (__stdcall *) (void *)) FindFunction(libOpenGL32, "wglDeleteContext");
    }
    return (jint) (* p_nbridge_wglDeleteContext)((void *) param_0);
}

static void * (__stdcall * p_nbridge_wglGetExtensionsStringARB) (void *) = NULL;

JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglGetExtensionsStringARB( JNIEnv *env, jobject self, jlong param_0) {
    if (p_nbridge_wglGetExtensionsStringARB == NULL) {
        p_nbridge_wglGetExtensionsStringARB = (void * (__stdcall *) (void *)) FindFunction(libOpenGL32, "wglGetExtensionsStringARB");
    }
    return (jlong) (* p_nbridge_wglGetExtensionsStringARB)((void *) param_0);
}

static int  (__stdcall * p_nbridge_wglChoosePixelFormatARB) (void *, void *, void *, int, void *, void *) = NULL;

JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglChoosePixelFormatARB( JNIEnv *env, jobject self, jlong param_0, jlong param_1, jlong param_2, jint param_3, jlong param_4, jlong param_5) {
    if (p_nbridge_wglChoosePixelFormatARB == NULL) {
        p_nbridge_wglChoosePixelFormatARB = (int  (__stdcall *) (void *, void *, void *, int, void *, void *)) FindFunction(libOpenGL32, "wglChoosePixelFormatARB");
    }
    return (jint) (* p_nbridge_wglChoosePixelFormatARB)((void *) param_0, (void *) param_1, (void *) param_2, (int) param_3, (void *) param_4, (void *) param_5);
}

int  (__stdcall * p_nbridge_wglShareLists) (void *, void *) = NULL;

JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglShareLists( JNIEnv *env, jobject self, jlong param_0, jlong param_1) {
    if (p_nbridge_wglShareLists == NULL) {
        p_nbridge_wglShareLists = (int  (__stdcall *) (void *, void *)) FindFunction(libOpenGL32, "wglShareLists");
    }
    return (jint) (* p_nbridge_wglShareLists)((void *) param_0, (void *) param_1);
}

static void * (__stdcall * p_nbridge_wglGetPbufferDCARB) (void *) = NULL;

JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_windows_WGL_wglGetPbufferDCARB( JNIEnv *env, jobject self, jlong param_0) {
    if (p_nbridge_wglGetPbufferDCARB == NULL) {
        p_nbridge_wglGetPbufferDCARB = (void * (__stdcall *) (void *)) FindFunction(libOpenGL32, "wglGetPbufferDCARB");
    }
    return (jlong) (* p_nbridge_wglGetPbufferDCARB)((void *) param_0);
}
